<?php

// application/models/Tblcompany.php
class Application_Model_Tblcompany {

    protected $_id;
    protected $_siret;
    protected $_companycode;
    protected $_nom;
    protected $_description;
    protected $_active;
    protected $_fournisseur;
    protected $_client;
    protected $_level;
    protected $_last_updated_on;
    protected $_adresse01;
    protected $_codepostal01;
    protected $_pays01;
    protected $_tel01;
    protected $_fax01;
    protected $_email01;
    protected $_adresse02;
    protected $_codepostal02;
    protected $_pays02;
    protected $_tel02;
    protected $_fax02;
    protected $_email02;

    public function __construct(array $options = null) {
        if (is_array($options)) {
            $this->setOptions($options);
        }
    }

    public function __set($name, $value) {
        $method = 'set' . $name;
        if (('mapper' == $name) || !method_exists($this, $method)) {
            throw new Exception('public function __set : Invalid tblcompany property');
        }
        $this->$method($value);
    }

    public function __get($name) {
        $method = 'get' . $name;
        if (('mapper' == $name) || !method_exists($this, $method)) {
            throw new Exception('public function __get : Invalid tblcompany property');
        }
        return $this->$method();
    }

    public function setOptions(array $options) {
        $methods = get_class_methods($this);
        foreach ($options as $key => $value) {
            $method = 'set' . ucfirst($key);
            if (in_array($method, $methods)) {
                $this->$method($value);
            }
        }
        return $this;
    }

    public function setId($id) {
        $this->_id = (int) $id;
        return $this;
    }

    public function getId() {
        return $this->_id;
    }

    public function setSiret($text) {
        $this->_siret = (string) $text;
        return $this;
    }

    public function getSiret() {
        return $this->_siret;
    }

    public function setCompanycode($text) {
        $this->_companycode = (string) $text;
        return $this;
    }

    public function getCompanycode() {
        return $this->_companycode;
    }

    public function setNom($text) {
        $this->_nom = (string) $text;
        return $this;
    }

    public function getNom() {
        return $this->_nom;
    }

    public function setDescription($text) {
        $this->_description = (string) $text;
        return $this;
    }

    public function getDescription() {
        return $this->_description;
    }

    public function getAdresse01() {
        return $this->_adresse01;
    }

    public function setAdresse01($text) {
        $this->_adresse01 = (string) $text;
        return $this;
    }

    public function setCodepostal01($text) {
        $this->_codepostal01 = (string) $text;
        return $this;
    }

    public function getCodepostal01() {
        return $this->_codepostal01;
    }

    public function setPays01($text) {
        $this->_pays01 = (string) $text;
        return $this;
    }

    public function getPays01() {
        return $this->_pays01;
    }

    public function setEmail01($text) {
        $this->_email01 = (string) $text;
        return $this;
    }

    public function getEmail01() {
        return $this->_email01;
    }

    public function setTel01($text) {
        $this->_tel01 = (string) $text;
        return $this;
    }

    public function getTel01() {
        return $this->_tel01;
    }

    public function setFax01($text) {
        $this->_fax01 = (string) $text;
        return $this;
    }

    public function getFax01() {
        return $this->_fax01;
    }

    public function getAdresse02() {
        return $this->_adresse02;
    }

    public function setAdresse02($text) {
        $this->_adresse02 = (string) $text;
        return $this;
    }

    public function setCodepostal02($text) {
        $this->_codepostal02 = (string) $text;
        return $this;
    }

    public function getCodepostal02() {
        return $this->_codepostal02;
    }

    public function setPays02($text) {
        $this->_pays02 = (string) $text;
        return $this;
    }

    public function getPays02() {
        return $this->_pays02;
    }

    public function setEmail02($text) {
        $this->_email02 = (string) $text;
        return $this;
    }

    public function getEmail02() {
        return $this->_email02;
    }

    public function setTel02($text) {
        $this->_tel02 = (string) $text;
        return $this;
    }

    public function getTel02() {
        return $this->_tel02;
    }

    public function getFax02() {
        return $this->_fax02;
    }

    public function setFax02($text) {
        $this->_fax02 = (string) $text;
        return $this;
    }

    public function setActive($text) {
        $this->_active = (string) $text;
        return $this;
    }

    public function getActive() {
        return $this->_active;
    }

    public function setFournisseur($text) {
        $this->_fournisseur = (string) $text;
        return $this;
    }

    public function getFournisseur() {
        return $this->_fournisseur;
    }

    public function setClient($text) {
        $this->_client = (string) $text;
        return $this;
    }

    public function getClient() {
        return $this->_client;
    }

    public function setLevel($text) {
        $this->_level = (string) $text;
        return $this;
    }

    public function getLevel() {
        return $this->_level;
    }

    public function setLast_updated_on($text) {
        $this->_last_updated_on = (string) $text;
        return $this;
    }

    public function getLast_updated_on() {
        return $this->_last_updated_on;
    }

}
